package com.betterwood.dragon.entity.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @author zhengyanhua
 * @create 2021-03-19 10:40
 */
@Data
public class WebFlightRecordDto {

    private String id;

    /**
     * app用户ID
     */
    // @NotBlank(message = "用户ID不能为空")
    private String appUserId;

    /**
     * 航班号
     */
    @NotBlank(message = "航班号不能为空")
    private String flightNo;

    /**
     * 航班状态
     */

    private Integer status = 0;

    /**
     * 用户状态
     */
    private Integer userStatus = 0;
    /**
     * 位置
     */
    @NotBlank(message = "shopId不能为空")
    private String shopId;

    // @NotBlank(message = "shopAddress不能为空")
    private String shopAddress;

    /**
     * 昵称
     */

    private String nickName;

    /**
     * 用户姓名
     */
    @NotBlank(message = "用户姓名不能为空")
    private String userName;

    /**
     * 手机号
     */
    @NotBlank(message = "手机号不能为空")
    private String phone;

    /**
     * 生日
     */
    private String birthday;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime latestloginDate;

    private String minappOpenId;// 小程序openid

    /**
     * 预计登机时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime planTime;

    /**
     * 休息时长
     */
    @NotNull(message = "时长不能为空")
    private Integer restLong;

    /**
     * 休息到期时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime restExpireTime;

    /**
     * 进入时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime startFlightTime;

    /**
     * 到期时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime endFlightTime;

    private String remark;

    /**
     * 默认都是系统用户自己增加
     */
    private Integer isWebSysAdd = 0;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;
}
